<?php

namespace App;

class EveryGame extends Model
{
    protected $table = 't_everygames';

    public function gameName()
    {
    	$game_name = [
	    	'tdh' => '推倒胡',
	    	'kdd' => '扣点点',
	    	'htwp' => '洪洞王牌',
            'xzkdd' => '忻州扣点点',
            'jz' => '晋中麻将'
    	];
    	$info = json_decode($this->base_info, true);
    	$name = "未设置";
    	if (array_key_exists($info['type'], $game_name)) {
    		$name = $game_name[$info['type']];
    	}

    	return $name;
    }
}